export default class pubsub{
    constructor(){
        this.events = {}
    }
    subscribe(event,callback){
        let self = this
        if(!self.events.hasOwnProperty(event)){
            self.events[event] = []
        }
        return self.events[event].push(callback)
    }
}